package com.shinhye.wisdompeking.utils;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;

public class FragUtils {

	public static void addFragment(FragmentActivity activity, int groupId, Fragment fragment, String TAG, boolean addStack) {
		FragmentTransaction transaction = activity.getSupportFragmentManager()
		.beginTransaction()
		.replace(groupId, fragment, TAG);
		if(addStack)
			transaction.addToBackStack(null);
		transaction.commit();
	}
}
